home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail-5.65c+IDA-1.4.4.1 / src / RCS / useful.h,v < prev    next >
Encoding:
Text File  |  1991-07-01  |  8.2 KB  |  440 lines

  1. head    4.6;
  2. branch    4.6.0;
  3. access;
  4. symbols
  5.     RELEASE:4.6.0.10
  6.     BETA:4.6.0.8
  7.     UICSO:4.6.0
  8.     VANILLA:4.6;
  9. locks; strict;
  10. comment    @ * @;
  11.  
  12.  
  13. 4.6
  14. date    90.06.20.08.37.15;    author paul;    state Exp;
  15. branches
  16.     4.6.0.1;
  17. next    ;
  18.  
  19. 4.6.0.1
  20. date    90.10.15.15.26.07;    author paul;    state Exp;
  21. branches;
  22. next    4.6.0.2;
  23.  
  24. 4.6.0.2
  25. date    90.11.07.13.56.14;    author paul;    state Exp;
  26. branches;
  27. next    4.6.0.3;
  28.  
  29. 4.6.0.3
  30. date    90.11.13.15.22.21;    author paul;    state Exp;
  31. branches;
  32. next    4.6.0.4;
  33.  
  34. 4.6.0.4
  35. date    91.03.06.18.43.06;    author paul;    state Exp;
  36. branches;
  37. next    4.6.0.5;
  38.  
  39. 4.6.0.5
  40. date    91.04.02.23.23.33;    author paul;    state Exp;
  41. branches;
  42. next    4.6.0.6;
  43.  
  44. 4.6.0.6
  45. date    91.04.05.14.55.15;    author paul;    state Exp;
  46. branches;
  47. next    4.6.0.7;
  48.  
  49. 4.6.0.7
  50. date    91.05.18.03.28.32;    author paul;    state Exp;
  51. branches;
  52. next    4.6.0.8;
  53.  
  54. 4.6.0.8
  55. date    91.05.23.21.42.59;    author paul;    state Exp;
  56. branches;
  57. next    4.6.0.9;
  58.  
  59. 4.6.0.9
  60. date    91.06.05.17.16.21;    author paul;    state Exp;
  61. branches;
  62. next    4.6.0.10;
  63.  
  64. 4.6.0.10
  65. date    91.06.24.20.18.55;    author paul;    state Exp;
  66. branches;
  67. next    ;
  68.  
  69.  
  70. desc
  71. @@
  72.  
  73.  
  74. 4.6
  75. log
  76. @5.64 Berkeley release
  77. @
  78. text
  79. @/*
  80.  * Copyright (c) 1988 Regents of the University of California.
  81.  * All rights reserved.
  82.  *
  83.  * Redistribution and use in source and binary forms are permitted provided
  84.  * that: (1) source distributions retain this entire copyright notice and
  85.  * comment, and (2) distributions including binaries display the following
  86.  * acknowledgement:  ``This product includes software developed by the
  87.  * University of California, Berkeley and its contributors'' in the
  88.  * documentation or other materials provided with the distribution and in
  89.  * all advertising materials mentioning features or use of this software.
  90.  * Neither the name of the University nor the names of its contributors may
  91.  * be used to endorse or promote products derived from this software without
  92.  * specific prior written permission.
  93.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  94.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  95.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  96.  *
  97.  *    @@(#)useful.h    4.6 (Berkeley) 6/1/90
  98.  */
  99.  
  100. # include <sys/types.h>
  101.  
  102. /* support for bool type */
  103. typedef char    bool;
  104. # define TRUE    1
  105. # define FALSE    0
  106.  
  107. # ifndef NULL
  108. # define NULL    0
  109. # endif NULL
  110.  
  111. /* bit hacking */
  112. # define bitset(bit, word)    (((word) & (bit)) != 0)
  113.  
  114. /* some simple functions */
  115. # ifndef max
  116. # define max(a, b)    ((a) > (b) ? (a) : (b))
  117. # define min(a, b)    ((a) < (b) ? (a) : (b))
  118. # endif max
  119.  
  120. /* assertions */
  121. # ifndef NASSERT
  122. # define ASSERT(expr, msg, parm)\
  123.     if (!(expr))\
  124.     {\
  125.         fprintf(stderr, "assertion botch: %s:%d: ", __FILE__, __LINE__);\
  126.         fprintf(stderr, msg, parm);\
  127.     }
  128. # else NASSERT
  129. # define ASSERT(expr, msg, parm)
  130. # endif NASSERT
  131.  
  132. /* sccs id's */
  133. # ifndef lint
  134. # define SCCSID(arg)    static char SccsId[] = "arg";
  135. # else lint
  136. # define SCCSID(arg)
  137. # endif lint
  138.  
  139. /* define the types of some common functions */
  140. extern char    *strcpy(), *strncpy();
  141. extern char    *strcat(), *strncat();
  142. extern char    *malloc();
  143. extern char    *index(), *rindex();
  144. extern int    errno;
  145. extern time_t    time();
  146. extern char    *ctime();
  147. extern char    *getenv();
  148. @
  149.  
  150.  
  151. 4.6.0.1
  152. log
  153. @Bruce Lilly (bruce%balilly@@sonyd1.broadcast.sony.com) provided System 5
  154. compatibility statements wrapped by #ifdef SYSTEM5.
  155. @
  156. text
  157. @d30 2
  158. a31 2
  159. #  define NULL    0
  160. # endif /* NULL */
  161. d38 3
  162. a40 3
  163. #  define max(a, b)    ((a) > (b) ? (a) : (b))
  164. #  define min(a, b)    ((a) < (b) ? (a) : (b))
  165. # endif /* max */
  166. d44 1
  167. a44 1
  168. #  define ASSERT(expr, msg, parm)\
  169. d50 3
  170. a52 3
  171. # else /* !NASSERT */
  172. #  define ASSERT(expr, msg, parm)
  173. # endif /* NASSERT */
  174. d56 4
  175. a59 4
  176. #  define SCCSID(arg)    static char SccsId[] = "arg";
  177. # else /* !lint */
  178. #  define SCCSID(arg)
  179. # endif /* !lint */
  180. d65 1
  181. a69 39
  182.  
  183. # ifndef SYSTEM5
  184. extern char    *index(), *rindex();
  185. # else /* SYSTEM5 */
  186. #  ifndef lint
  187. #   ifdef MAIN
  188. #    define IN_SCCS_ID
  189. #   endif /* MAIN */
  190. #  endif /* !lint */
  191. #  include <unistd.h>
  192. #  include <sys/types.h>
  193. /*#  include <pwd.h>*/
  194. #  include <string.h>
  195. #  include <fcntl.h>
  196. #  define    index        strchr
  197. #  define    rindex        strrchr
  198. #  define    bcopy(h,a,l)    memcpy(a,h,l)
  199. #  define    bzero(s,n)    memset(s,0,n)
  200. #  define    bcmp        memcmp
  201. #  define    vfork        fork
  202. #  ifndef NOFILE
  203. #   include <sys/param.h>
  204. #  endif /* NOFILE */
  205. #  define    getdtablesize()    NOFILE
  206. #  ifndef SIGCHLD
  207. #   define    SIGCHLD        SIGCLD
  208. #  endif /* !SIGCHLD */
  209. /* #  define    gethostbyaddr    Gethostbyaddr */
  210. #  define    direct        dirent
  211. #  include <dirent.h>
  212. extern    char    *strchr(),    *strrchr();
  213. #  include <grp.h>
  214. #  ifndef NGROUPS_MAX
  215. #   define    initgroups(u,g)    kill(0,0)
  216. #  endif /* !NGROUPS_MAX */
  217. #  ifndef MAX
  218. #   define    MAX(a,b)    ((a)>(b))?(a):(b)
  219. #  endif /* !MAX */
  220. # endif /* !SYSTEM5 */
  221. @
  222.  
  223.  
  224. 4.6.0.2
  225. log
  226. @Cleaned up useful.h SYSTEM5 stuff.
  227. @
  228. text
  229. @d22 1
  230. a22 5
  231. #ifndef lint
  232. # ifdef _DEFINE
  233. static char useful_h_sccsid[] = "@@(#)useful.h    4.6 (Berkeley) 6/1/9";
  234. # endif /* _DEFINE */
  235. #endif /* !lint */
  236. a23 2
  237. #include <sys/types.h>
  238.  
  239. d26 2
  240. a27 2
  241. #define TRUE    1
  242. #define FALSE    0
  243. d29 3
  244. a31 3
  245. #ifndef NULL
  246. # define NULL    0
  247. #endif /* NULL */
  248. d34 1
  249. a34 1
  250. #define bitset(bit, word)    (((word) & (bit)) != 0)
  251. d37 4
  252. a40 4
  253. #ifndef max
  254. # define max(a, b)    ((a) > (b) ? (a) : (b))
  255. # define min(a, b)    ((a) < (b) ? (a) : (b))
  256. #endif /* !max */
  257. d43 2
  258. a44 2
  259. #ifndef NASSERT
  260. # define ASSERT(expr, msg, parm)\
  261. d50 3
  262. a52 3
  263. #else /* !NASSERT */
  264. # define ASSERT(expr, msg, parm)
  265. #endif /* NASSERT */
  266. d55 5
  267. a59 5
  268. #ifndef lint
  269. # define SCCSID(arg)    static char SccsId[] = "arg";
  270. #else /* lint */
  271. # define SCCSID(arg)
  272. #endif /* !lint */
  273. d70 1
  274. a70 1
  275. #ifndef SYSTEM5
  276. d72 27
  277. a98 21
  278. #else /* SYSTEM5 */
  279. # include <unistd.h>
  280. # include <sys/types.h>
  281. /*# include <pwd.h>*/
  282. # include <string.h>
  283. # include <fcntl.h>
  284. # define    index        strchr
  285. # define    rindex        strrchr
  286. # define    bcopy(h,a,l)    memcpy(a,h,l)
  287. # define    bzero(s,n)    memset(s,0,n)
  288. # define    bcmp        memcmp
  289. # define    vfork        fork
  290. # ifndef NOFILE
  291. #  include <sys/param.h>
  292. # endif /* NOFILE */
  293. # define    getdtablesize()    NOFILE
  294. # ifndef SIGCHLD
  295. #  define    SIGCHLD        SIGCLD
  296. # endif /* !SIGCHLD */
  297. # define    direct        dirent
  298. # include <dirent.h>
  299. d100 8
  300. a107 8
  301. # include <grp.h>
  302. # ifndef NGROUPS_MAX
  303. #  define    initgroups(u,g)    kill(0,0)
  304. # endif /* !NGROUPS_MAX */
  305. # ifndef MAX
  306. #  define    MAX(a,b)    ((a)>(b))?(a):(b)
  307. # endif /* !MAX */
  308. #endif /* !SYSTEM5 */
  309. @
  310.  
  311.  
  312. 4.6.0.3
  313. log
  314. @Changed #ifdef SYSTEM5 to SYSV to be consistent with current usage.
  315. @
  316. text
  317. @d76 1
  318. a76 1
  319. #ifndef SYSV
  320. d78 1
  321. a78 1
  322. #else /* SYSV */
  323. d107 1
  324. a107 1
  325. #endif /* !SYSV */
  326. @
  327.  
  328.  
  329. 4.6.0.4
  330. log
  331. @ANSIfied.
  332. @
  333. text
  334. @d30 2
  335. a31 2
  336. /* support for bool type.  going from char to int increased BSS by 16 bytes */
  337. typedef int    bool;
  338. a67 5
  339. #ifdef __STDC__
  340. # include <string.h>
  341. # include <unistd.h>
  342. # include <stdlib.h>
  343. #else /* !__STDC__ */
  344. d71 1
  345. a74 2
  346. #endif /* __STDC__ */
  347. extern int    errno;
  348. d79 4
  349. @
  350.  
  351.  
  352. 4.6.0.5
  353. log
  354. @Add __STRICT_BSD__ tests around posix include files to keep Next happy.
  355. @
  356. text
  357. @d70 2
  358. a71 4
  359. # ifndef __STRICT_BSD__
  360. #  include <unistd.h>
  361. #  include <stdlib.h>
  362. # endif /* !__STRICT_BSD__ */
  363. @
  364.  
  365.  
  366. 4.6.0.6
  367. log
  368. @Added RCS ID string
  369. @
  370. text
  371. @a24 1
  372. static char useful_h_rcsid[] = "@@(#)$Id$";
  373. @
  374.  
  375.  
  376. 4.6.0.7
  377. log
  378. @Added definition for O_SYNC as O_DIRECT if not defined.  Part of the
  379. System 5 and general improvement patches contributed by Bruce Lilly
  380. (bruce%balilly@@broadcast.sony.com).
  381. @
  382. text
  383. @d24 2
  384. a25 2
  385. static char useful_h_sccsid[] = "@@(#)useful.h    4.6 (Berkeley) 6/1/9    %I% local";
  386. static char useful_h_rcsid[] = "@@(#)$Id: useful.h,v 4.6.0.6 1991/04/05 14:55:15 paul Exp paul $";
  387. a88 5
  388. # ifndef O_SYNC
  389. #  ifdef O_DIRECT
  390. #   define    O_SYNC    O_DIRECT
  391. #  endif /* O_DIRECT */
  392. # endif /* !O_SYNC */
  393. @
  394.  
  395.  
  396. 4.6.0.8
  397. log
  398. @Further changes for Interactive Systems UNIX adapted from patches
  399. sent by Andy Linton <Andy.Linton@@comp.vuw.ac.nz>.
  400. @
  401. text
  402. @d25 1
  403. a25 1
  404. static char useful_h_rcsid[] = "@@(#)$Id: useful.h,v 4.6.0.7 1991/05/18 03:28:32 paul Exp paul $";
  405. d108 1
  406. a108 5
  407. # ifdef ISC
  408. #  include <sys/dirent.h>
  409. # else /* !ISC */
  410. #  include <dirent.h>
  411. # endif /* ISC */
  412. @
  413.  
  414.  
  415. 4.6.0.9
  416. log
  417. @Deleted SCCSID macro as ANSI C won't allow substitution in a string literal.
  418. @
  419. text
  420. @d25 1
  421. a25 1
  422. static char useful_h_rcsid[] = "@@(#)$Id: useful.h,v 4.6.0.8 1991/05/23 21:42:59 paul Exp paul $";
  423. d60 7
  424. @
  425.  
  426.  
  427. 4.6.0.10
  428. log
  429. @Changed time_t to TIME_TYPE.
  430. @
  431. text
  432. @d24 2
  433. a25 2
  434. static char useful_h_sccsid[] = "@@(#)useful.h    4.6 (Berkeley) 6/1/9";
  435. static char useful_h_rcsid[] = "@@(#)$Id: useful.h,v 4.6.0.9 1991/06/05 17:16:21 paul Exp paul $";
  436. d72 1
  437. a72 1
  438. extern TIME_TYPE    time();
  439. @
  440.